package com.apimanage.common.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.stereotype.Component;

/**
 * Swagger基础配置属性类
 * 暂时禁用，以解决FactoryBean相关问题
 */
@ConfigurationProperties(prefix = "swagger")
@Component
@ConditionalOnProperty(name = "swagger.enabled", havingValue = "true", matchIfMissing = false)
public class SwaggerProperties {
    /**
     * 是否启用Swagger
     */
    private Boolean enabled = true;
    
    /**
     * API文档标题
     */
    private String title = "API管理平台";
    
    /**
     * API文档描述
     */
    private String description = "API管理平台接口文档";
    
    /**
     * API文档版本
     */
    private String version = "1.0.0";
    
    /**
     * 联系人姓名
     */
    private String contactName = "API管理平台";
    
    /**
     * 联系人邮箱
     */
    private String contactEmail = "admin@apimanage.com";
    
    /**
     * 扫描的包路径
     */
    private String basePackage = "com.apimanage";

    public Boolean getEnabled() {
        return enabled;
    }

    public void setEnabled(Boolean enabled) {
        this.enabled = enabled;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public String getContactName() {
        return contactName;
    }

    public void setContactName(String contactName) {
        this.contactName = contactName;
    }

    public String getContactEmail() {
        return contactEmail;
    }

    public void setContactEmail(String contactEmail) {
        this.contactEmail = contactEmail;
    }

    public String getBasePackage() {
        return basePackage;
    }

    public void setBasePackage(String basePackage) {
        this.basePackage = basePackage;
    }
}